/* --- Variables & Global Styles --- */
:root {
    --peach: #FFDAB9;
    --coral: #FFA07A;
    --beige: #FFF5E1;
    --green: #A8D8B9;
    --dark-text: #4F4F4F;
    --light-text: #6c6c6c;
    --white: #FFFFFF;
    --font-primary: 'Quicksand', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--dark-text);
    background-color: var(--beige);
    line-height: 1.7;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--dark-text);
}

h1 {
    font-size: 2.8rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
}

p {
    margin-bottom: 20px;
    color: var(--light-text);
}

section {
    padding: 80px 0;
}

.cta-button {
    display: inline-block;
    background-color: var(--coral);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-family: var(--font-secondary);
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 160, 122, 0.5);
}

.cta-button:hover {
    transform: translateY(-3px);
    background-color: #ff8a60;
}

/* --- Header --- */
.header {
    background-color: rgba(255, 245, 225, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 40px;
}

.main-nav .nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--coral);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.main-nav a.active {
    font-weight: 700;
    color: var(--coral);
}
.main-nav a.active::after {
    width: 100%;
}

.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-text);
    cursor: pointer;
}

/* --- Hero Section --- */
.hero-section {
    padding-top: 150px;
    padding-bottom: 80px;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero-text p {
    font-size: 1.1rem;
    margin: 20px 0 30px;
}

.hero-image-container {
    flex: 1;
    text-align: center;
}

.hero-image-container img {
    max-width: 100%;
    height: auto;
}

/* --- Page Content --- */
.main-content {
    padding-top: 120px;
}

/* --- About Section --- */
.about-section {
    background-color: var(--white);
}
.about-section .container {
    max-width: 800px;
    text-align: center;
}

/* --- Formations Section --- */
.free-formation-box {
    background: var(--white);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid var(--peach);
    position: relative;
    overflow: hidden;
}

.free-formation-box::before {
    content: "GRATUIT";
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--green);
    color: white;
    padding: 8px 40px;
    transform: rotate(45deg);
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1;
}

.free-formation-box h4 {
    font-family: var(--font-secondary);
    color: var(--coral);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.free-formation-box h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

.free-formation-box p {
    font-size: 1.1rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.free-formation-benefits {
    list-style: none;
    padding: 0;
    margin: 25px auto 35px auto;
    text-align: left;
    display: inline-block;
}

.free-formation-benefits li {
    margin-bottom: 12px;
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--dark-text);
}

.free-formation-box .cta-button {
    margin-top: 10px;
}

.formations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.formation-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    display: block;
    text-decoration: none;
    color: inherit;
}

.formation-card:hover {
    transform: translateY(-10px);
}

.formation-icon {
    height: 70px;
    margin-bottom: 20px;
}

.formation-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* --- Newsletter Box on Formation Page --- */
.newsletter-box {
    margin-top: 30px;
}

#newsletter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    background: white;
    padding: 10px;
    border-radius: 50px;
    box-shadow: var(--shadow);
}

#newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 12px 20px;
    border: none;
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--dark-text);
    background-color: transparent;
    min-width: 200px;
}

#newsletter-form input[type="email"]::placeholder {
    color: var(--light-text);
    opacity: 0.8;
}

#newsletter-form input[type="email"]:focus {
    outline: none;
}

#newsletter-form .cta-button {
    flex-shrink: 0;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 10px 25px;
    box-shadow: none;
    line-height: 1.5; /* Align text better */
}

/* --- Formation Detail Page --- */
.formation-detail-hero {
    padding-top: 150px;
    padding-bottom: 60px;
    background-color: var(--white);
    display: flex;
    align-items: center;
}

.formation-detail-hero .container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.formation-hero-text {
    flex: 1.2;
}
.formation-hero-text h1 {
    font-size: 2.6rem;
}
.formation-hero-text p {
    font-size: 1.2rem;
    margin: 20px 0 30px;
}

.formation-hero-image {
    flex: 1;
    text-align: center;
}

.formation-hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.formation-detail-page {
    padding: 60px 0 80px;
}

.course-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: flex-start;
}

.course-main-column h2 {
    text-align: left;
    margin-bottom: 20px;
    margin-top: 30px;
}
.course-main-column h2:first-of-type {
    margin-top: 0;
}

.course-main-column h3 {
    margin: 30px 0 15px;
    font-size: 1.5rem;
}

.checklist {
    list-style: none;
    padding-left: 0;
}
.checklist li {
    position: relative;
    padding-left: 35px;
    margin-bottom: 10px;
    font-size: 1.05rem;
}
.checklist li::before {
    content: '✅';
    position: absolute;
    left: 0;
    top: -2px;
    font-size: 1.2rem;
}

.modules-container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.module {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--peach);
    overflow: hidden;
}

.module-header {
    background-color: #FFF9F2;
    padding: 15px 20px;
    border-bottom: 1px solid var(--peach);
}
.module-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

.module-content {
    padding: 20px;
    padding-left: 25px;
}
.module-content ul {
    list-style: none;
    padding: 0;
}
.module-content li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}
.module-content li:last-child {
    margin-bottom: 0;
}
.module-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: bold;
    font-size: 1.1rem;
}

.course-sidebar {
    position: sticky;
    top: 100px; /* Adjust based on header height */
    height: fit-content;
}

.course-summary-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border-top: 5px solid var(--green);
    margin-bottom: 30px;
}
.course-summary-card h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
}
.course-summary-card .cta-button {
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

.checklist-alt {
    list-style: none;
    padding: 0;
}
.checklist-alt li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}
.checklist-alt li::before {
    content: '✓';
    color: var(--green);
    font-weight: bold;
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
}

.course-sidebar .testimonial-card {
    max-width: 100%;
}

/* --- Testimonials Section --- */
.testimonials-section {
    background-color: var(--white);
}

.swiper-container {
    width: 100%;
    padding: 20px 0 50px;
    --swiper-navigation-color: var(--coral);
    --swiper-navigation-size: 30px;
    overflow: hidden;
    position: relative; /* Nécessaire pour le positionnement absolu des flèches */
}

/* Flèches positionnées au milieu vertical des slides */
.swiper-button-next, 
.swiper-button-prev {
    display: flex !important;
    background: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--shadow);
    top: 50%; /* Positionne au milieu vertical */
    margin-top: 50; /* Annule tout décalage */
    transform: translateY(-50%); /* Centrage précis */
}

.swiper-button-next {
    right: 10px; /* Éloigné du bord */
}

.swiper-button-prev {
    left: 10px; /* Éloigné du bord */
}

/* Points de pagination rapprochés des slides */
.swiper-pagination {
    bottom: 200px !important; /* Réduit l'espace sous les slides */
}

.swiper-pagination-bullet {
    margin: 0 5px !important; /* Réduit l'espace entre les points */
}

.testimonial-card {
    background-color: var(--beige);
    padding: 80px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--peach);
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 0px;
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid var(--white);
    box-shadow: var(--shadow);
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.testimonial-card h4 {
    font-family: var(--font-secondary);
    font-weight: 300;
    color: var(--coral);
}

.swiper-pagination-bullet {
    background: var(--peach);
}

.swiper-pagination-bullet-active {
    background: var(--coral);
}

.swiper-button-next, .swiper-button-prev {
    display: none;
}

/* --- Final CTA Section --- */
.cta-final-section {
    background-color: var(--green);
    color: var(--white);
    text-align: center;
}

.cta-final-section h2 {
    color: var(--white);
}
.cta-final-section p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.cta-final-section .cta-button {
    background-color: var(--white);
    color: var(--coral);
    box-shadow: none;
}
.cta-final-section .cta-button:hover {
    background-color: var(--beige);
}

/* --- Rejoindre Page --- */
#rejoindre ul {
    list-style: none;
    padding: 0;
    margin: 30px auto;
    max-width: 500px;
    text-align: left;
    color: rgba(255, 255, 255, 0.95);
}

#rejoindre li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    font-size: 1.1rem;
}

#rejoindre li::before {
    content: '✓';
    color: var(--white);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
    font-family: 'Poppins', sans-serif;
}

/* --- Contact Page --- */
.contact-section {
    background-color: var(--white);
}

.contact-section .container {
    max-width: 700px;
    text-align: center;
}

.contact-form {
    margin-top: 30px;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-family: var(--font-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--peach);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    background-color: #fff;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--coral);
    box-shadow: 0 0 0 3px rgba(255, 160, 122, 0.3);
}

.contact-form .cta-button {
    width: 100%;
    padding: 15px;
    border: none;
    cursor: pointer;
}

/* --- Landing Page --- */
.landing-page.hero-section {
    padding-top: 150px;
    padding-bottom: 80px;
}

.landing-page .hero-text {
    flex-basis: 55%; /* Give more space to text */
}

.landing-title {
    font-size: 2.6rem;
    line-height: 1.3;
    margin-bottom: 20px;
    position: relative;
    padding-left: 45px;
}

.landing-title::before {
    content: '👉';
    position: absolute;
    left: 0;
    top: 5px;
    font-size: 2.2rem;
    line-height: 1;
}

.landing-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
}
.landing-subtitle strong {
    color: var(--coral);
    font-weight: 700;
}

.discover-box {
    background-color: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 35px;
    border-left: 5px solid var(--green);
}

.discover-title {
    font-size: 1.4rem;
    font-family: var(--font-secondary);
    margin-bottom: 20px;
    color: var(--dark-text);
}

.discover-list {
    list-style: none;
    padding: 0;
}

.discover-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    color: var(--light-text);
    font-size: 1.05rem;
    line-height: 1.5;
}

.discover-list li:last-child {
    margin-bottom: 0;
}

.discover-list .check {
    margin-right: 15px;
    line-height: 1.5;
    font-size: 1.1rem;
}

.landing-cta {
    font-size: 1.2rem;
    padding: 15px 35px;
}

.landing-cta:hover {
    transform: translateY(-3px) scale(1.05);
}

/* --- Footer --- */
.footer {
    background-color: var(--peach);
    padding-top: 60px;
    padding-bottom: 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-column h4 {
    margin-bottom: 15px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li a {
    text-decoration: none;
    color: var(--light-text);
    margin-bottom: 10px;
    display: inline-block;
}

.social-links a {
    color: var(--dark-text);
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--coral);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--dark-text);
    text-decoration: underline;
}

/* --- Animations --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.formation-card.animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.formation-card.animate-on-scroll:nth-child(3) { transition-delay: 0.4s; }

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    .hero-text {
        order: 2;
    }
    .hero-image-container {
        order: 1;
        margin-bottom: 30px;
    }
    h1 { font-size: 2.4rem; }
    h2 { font-size: 2rem; }

    .formation-detail-hero .container {
        flex-direction: column;
        text-align: center;
    }
    .formation-hero-text {
        order: 2;
    }
    .formation-hero-image {
        order: 1;
        margin-bottom: 30px;
    }
    .formation-hero-text h1 {
        font-size: 2.4rem;
    }
    .course-layout {
        grid-template-columns: 1fr;
    }
    .course-sidebar {
        position: static;
        margin-top: 40px;
    }

    .landing-title {
        font-size: 2.2rem;
        padding-left: 0;
        text-align: center;
    }
    .landing-title::before {
        display: none;
    }
    .landing-page .hero-text {
        flex-basis: 100%;
    }
    .discover-box {
        text-align: left;
    }
    .discover-title {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 70px; /* header height */
        left: 0;
        width: 100%;
        background-color: var(--beige);
        box-shadow: var(--shadow);
    }
    .main-nav.active {
        display: block;
    }
    .main-nav .nav-links {
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 0;
    }
    .main-nav .nav-links li {
        width: 100%;
        text-align: center;
    }
    .main-nav .nav-links a {
        display: block;
        padding: 15px 0;
        width: 100%;
    }
    .main-nav a::after { display: none; }

    .header-cta { display: none; }
    .mobile-menu-button { display: block; }

    .hero-section { padding-top: 120px; }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        margin-top: 10px;
    }

    /* Newsletter Section */
#newsletter-section {
    /* margin-top: 3rem; implicit by blog-posts margin-bottom */
    /* margin-bottom: 2rem; implicit by main padding-bottom */
}

#newsletter-form {
    flex-direction: column;
    align-items: stretch;
    border-radius: 15px;
    padding: 20px;
    background: transparent;
    box-shadow: none;
}
#newsletter-form input[type="email"] {
    background-color: var(--white);
    border: 1px solid var(--peach);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin-bottom: 10px;
}
#newsletter-form .cta-button {
    width: 100%;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(255, 160, 122, 0.5);
}
}